﻿@model DotNet.Model.MyEntity.Base_User
<script type="text/javascript">
    function selectRole() {
        //弹出角色选择框
        $.pdialog.open("/Permission/Role/SelectRole/" + $("#UserName").val(), "rel_Permission_Role_SelectRole", "选择角色", { "width": "300", "height": "360", "mask": "true" });
    }

    $(function () {
        $("#DutyOrderId").change(function () {
            $("#DutyOrderName").val($(this).find("option:selected").text());
        });
    });    </script>
<div class="pageFormContent" layouth="58">
    @Html.Raw(Model == null || Model.Id == null ? "" : "<input type=\"hidden\" value=\"" + Model.Id + "\" id=\"Id\" name=\"Id\" />")
    <table width="95%" class="tab01">
        <tr>
            <td class="td1" style="width:25%;">
                    姓名：
            </td>
            <td>
                @Html.Raw(Model == null || Model.Id == null ? "" : "<input type=\"hidden\" value=\"" + Model.Id + "\" id=\"Id\" name=\"Id\" />")
                @Html.TextBoxFor(m => m.RealName, new Dictionary<string, object> { { "alt", "请输入姓名" },{"class","input02"} })
                @Html.ValidationMessageFor(m => m.RealName)
            </td>
        </tr>
        <tr>
            <td class="td1">
                    编号：
            </td>
            <td>
                @Html.TextBoxFor(m => m.Code, new Dictionary<string, object> { { "class", "input02" } })
            </td>
        </tr>
        <tr>
            <td class="td1">
                    排序：
            </td>
            <td>
                @Html.TextBoxFor(m => m.SortCode, new Dictionary<string, object> { { "class", "input02" } })
            </td>
        </tr>
        <tr>
            <td class="td1">
                    用户名：
            </td>
            <td>
                @Html.TextBoxFor(m => m.UserName, new Dictionary<string, object> { { "class", "input02" } })
                @Html.ValidationMessageFor(m => m.UserName)
            </td>
        </tr>
        <tr>
            <td class="td1">
                    角色：
            </td>
            <td>
                <input type="hidden" id="roleIDs_Permission_User_CreateUser" name="roleIDs" value="@ViewData["roleListID"]" />
                <input id="roleNames_Permission_User_CreateUser" name="roleNames" class="input02 textInput" type="text" value="@ViewBag.RoleNames" disabled="disabled" readonly="readonly" />
                <a class="btnLook" href="javascript:selectRole();"><span>选择</span></a> @*@Html.DropDownListFor(m => m.RoleId, new SelectList(ViewBag.list as System.Collections.IEnumerable, "Id", "Realname"), "--请选择角色--")*@
            </td>
        </tr>
        <tr>
            <td class="td1">
                    密 码：
            </td>
            <td>
                @Html.PasswordFor(m => m.UserPassword, new Dictionary<string, object> { { "class", "input02" } })
                @Html.ValidationMessageFor(m => m.UserPassword)
            </td>
        </tr>
        <tr>
            <td class="td1">
                    确认密码：
            </td>
            <td>
                @Html.PasswordFor(m => m.tUserPassword, new Dictionary<string, object> { { "class", "input02" } })
                @Html.ValidationMessageFor(m => m.tUserPassword)
            </td>
        </tr>
        <tr>
            <td class="td1">
                    公司：
            </td>
            <td>
                    <input type="hidden" id="CompanyId" name="CompanyId" value="@ViewBag.CompanyId" />
                    <input type="text" class="input02" id="txtCompanyName" name="CompanyName" value="@ViewBag.CompanyName" onkeydown="return false;"  readonly="readonly"/>
                @*取消选择公司 WS 2011.10.24*@ @*<a class="button" href="/Permission/Organize/SelectOrganize/3_3" target="dialog" rel="dialog_permisson_Organize_createStaff1" title="请选择公司..." mask="true" width="280" height="350"><span>选择</span></a>*@
            </td>
        </tr>
        <tr>
            <td class="td1">
                    部门：
            </td>
            <td>
                    <input type="hidden" id="DepartmentId" name="DepartmentId" value="@ViewBag.DepartId" />
                    @*@Html.HiddenFor(m => m.DepartmentId)*@
                    <input type="text" id="txtDepartmentName" class="input02" name="DepartmentName" value="@ViewBag.DepartName " onkeydown="return false;"  readonly="readonly"/>
                @*取消选择部门 WS 2011.10.24*@ @*<a class="button" href="/Permission/Organize/SelectOrganize/4_2" target="dialog" rel="dialog_permisson_Organize_createStaff2" title="请选择部门..." mask="true" width="280" height="350"><span>选择</span></a>*@
            </td>
        </tr>
        <tr>
            <td class="td1">
                    岗位：
            </td>
            <td>
                    <input type="hidden" id="DutyId" name="DutyId" value="@ViewBag.DutyId" />
                    @*@Html.HiddenFor(m => m.DutyId)*@
                    <input type="text" id="txtDutyName" class="input02" value="@ViewBag.DutyName" onkeydown="return false;" readonly="readonly" />
                @*取消选择岗位 WS 2011.10.24*@ @* <a class="button" href="/Permission/Organize/SelectOrganize/5_1" target="dialog" rel="dialog_permisson_Organize_createStaff3" title="请选择岗位..." mask="true" width="280" height="350"><span>选择</span></a>*@
            </td>
        </tr>
        @*取消选择工作组 WS 2011.10.24*@ @*<tr>
                <td class="td1">
                    <label>
                        工作组：</label>
                </td>
                <td>
                  <span style="float:left">
                    @Html.HiddenFor(m => m.WorkgroupId)
                    <input type="text" id="txtWorkgroupName" value="" onkeydown="return false;" /></span>
                    <a class="button" href="/Permission/Organize/SelectOrganize/6_2" target="dialog" rel="dialog_permisson_Organize_createStaff4" title="请选择工作组..." mask="true" width="280" height="350"><span>选择</span></a>
                </td>
            </tr>*@
       @* <tr>
            <td class="td1">
                <label>
                    岗位序列：</label>
            </td>
            <td>
                @Html.HiddenFor(m => m.DutyOrderName)
                @Html.DropDownListFor(m => m.DutyOrderId, new SelectList(ViewBag.DutyList as System.Collections.IEnumerable, "ID", "ItemName"), "--请选择岗位序列--")
            </td>
        </tr>*@
        <tr>
            <td class="td1">
                    职称：
            </td>
            <td>
                @Html.DropDownListFor(m => m.Title, new SelectList(ViewBag.Titles as System.Collections.IEnumerable, "ItemValue", "ItemName"), "--请选择职称--")
            </td>
        </tr>
        <tr>
            <td class="td1">
                    电子邮件：
            </td>
            <td>
                @Html.TextBoxFor(m => m.Email, new Dictionary<string, object> { { "class", "input02" } })
            </td>
        </tr>
        <tr>
            <td class="td1">
                    手机：
            </td>
            <td>
                @Html.TextBoxFor(m => m.Mobile, new Dictionary<string, object> { { "class", "input02" } })
            </td>
        </tr>
        <tr>
            <td class="td1">
                    QQ：
            </td>
            <td>
                @Html.TextBoxFor(m => m.OICQ, new Dictionary<string, object> { { "class", "input02" } })
            </td>
        </tr>
        <tr>
            <td class="td1">
                    地址：
            </td>
            <td>
                @Html.TextAreaFor(m => m.HomeAddress, new Dictionary<string, object> { { "class", "input02" } })
                @Html.ValidationMessageFor(m => m.HomeAddress)
            </td>
        </tr>
        <tr>
            <td class="td1">
            </td>
            <td>
                <input type="checkbox" name="Enabled" id="Enabled" value="1"  @Html.Raw(Model == null || Model.Enabled == null ? "checked='checked'" : (Model.Enabled == 1 ? "checked='checked'" : "")) />有效
            </td>
        </tr>
    </table>
</div>
